home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Aventura / lightsprites.swf / scripts / frame_1 / PlaceObject2_800_142 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2007-09-27  |  1015 b   |  37 lines

  1. onClipEvent(enterFrame){
  2.    if(Counter == -1)
  3.    {
  4.       bytesLoaded = _root.getBytesLoaded();
  5.       amountLoaded = bytesLoaded / totalFileSize;
  6.       percentLoaded = int(100 * amountLoaded);
  7.       _root.preloader.inside._xscale = percentLoaded;
  8.       myMessageOne = int(bytesLoaded / 1024) + "kb / " + int(totalFileSize / 1024) + "kb";
  9.       myMessageOne = myMessageOne + "\n" + percentLoaded + "%";
  10.       _root.loadingVars = myMessageOne;
  11.       if(amountLoaded >= 1 && myFlag == 0)
  12.       {
  13.          myFlag = 1;
  14.          Counter = 50;
  15.       }
  16.    }
  17.    else if(Counter == 0)
  18.    {
  19.       okToPlay = true;
  20.       siteURL = "http://www.herointeractive.com";
  21.       siteURL2 = "http://herointeractive.com";
  22.       if(_url.substr(0,siteURL.length) == siteURL || _url.substr(0,siteURL2.length) == siteURL2)
  23.       {
  24.          okToPlay = true;
  25.       }
  26.       if(okToPlay)
  27.       {
  28.          _root.preloader.gotoAndPlay(2);
  29.          Counter = -2;
  30.       }
  31.    }
  32.    else
  33.    {
  34.       Counter--;
  35.    }
  36. }
  37.